<!DOCTYPE html>
<html>
<head>

	<title>购买</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="yes" name="apple-touch-fullscreen">
	<meta content="telephone=no,email=no" name="format-detection">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/AmazeUI/assets/css/amazeui.css">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/common.css?v={$WST_V}">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/normalize.css" type="text/css">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/buy.css" type="text/css">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/small_page.css" type="text/css">
	<link href="http://www.jq22.com/jquery/bootstrap-3.3.4.css" rel="stylesheet">
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jisuan.js"></script>
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jquery-1.7.2.min.js"></script>
	<script src="http://www.jq22.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/distpicker.data.js"></script>
	<script src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/distpicker.js"></script>
	<script type="text/javascript">
		//调用微信JS api 支付
		function jsApiCall()
		{
			WeixinJSBridge.invoke(
					'getBrandWCPayRequest',
					<?php echo $jsApiParameters; ?>,
		function(res){
//					alert(JSON.stringify(res));
//                    alert(res.err_msg)
			// WeixinJSBridge.log(res.err_msg);
			if(res.err_msg == "get_brand_wcpay_request:ok"){
//                        alert(1)
			/*这里写如果支付成功的话执行什么操作*/
//						alert('支付成功'+JSON.stringify(res));
			wstMsg('下单成功');
			setTimeout(function(){
			location.href = WST.U('WebApp/Orders/index');
		}, 500);
			storageRemoveItem('orderInfo');
		}else{
			//返回跳转到订单详情页面
			alert('支付失败');

		}
		}
		);
		}
		function callpay()
		{
			if (typeof WeixinJSBridge == "undefined"){
				if( document.addEventListener ){
					document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
				}else if (document.attachEvent){
					document.attachEvent('WeixinJSBridgeReady', jsApiCall);
					document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
				}
			}else{
				jsApiCall();
			}
		}

	</script>
	 <style type="text/css">
		.Head{
			width: 9.5rem;
			height: 2rem;
			box-shadow: 0 1px 4px 0 rgba(130,130,130,0.50);
			margin-left: 0.25rem;
			margin-top: 0.2rem;
			font-size: 0.426667rem;
			/*color: #414141;*/
			position: relative;
		}
		.d1{
			float: left;
			margin-top: 0.5rem;
		}
		.Price{
			float: right;
			margin-right: 10px;
				margin-top: 0.5rem;
		}
		.d2{
			position: absolute;
			margin-top: 1.3rem;
		}
		.Body{
			text-align: center;
		}
	</style>
</head>
<body>
	<div class="Head">
		<div class="d1">需补的差价</div>
		<div class="Price">
			<span>￥</span>
			<span>{$realMoney}</span>
		</div>
		<div class="d2">
		  你还需要补<span>{$realMoney}</span>差价。
		</div>
	</div>
	
	<div class="Body">
		<div class="zhifu" >
		<div class=zhifu_img onclick="jsApiCall()">
			<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 33.png" style="width:100%;height:100%;">
		</div>
	</div>
	</div>
	<include file="./Apps/WebApp/View/default/common_js.html" />
</body>
</html>